﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FrameworkX.ObjectSpace.Data.Schema
{
    public class IndexAttribute : ConstraintAttribute
    {
        private string[] _parameters = null;
        private string _indexName = string.Empty;
        private bool _isUnique = false;
        private bool _isClustered = false;

        public IndexAttribute(string name, bool isUnique, bool isClustered, params string[] parameters) : base (ConstraintHelper.GenerateIndex)
        {
            _indexName = name;
            _isUnique = isUnique;
            _isClustered = isClustered;
            _parameters = parameters;
            
        }


        public string[] Parameters
        {
            get { return _parameters; }
        }

        public string IndexName { get { return _indexName; } }
        public bool IsClustered { get { return _isClustered; } }
        public bool IsUnique { get { return _isUnique; } }

    }
}
